package jp.co.lty.mai.service;

import java.util.Map;

import jp.co.lty.mai.meta.WorkingSheetMeta;
import jp.co.lty.mai.model.WorkingSheet;

import org.slim3.datastore.Datastore;
import org.slim3.util.BeanUtil;

import com.google.appengine.api.datastore.Transaction;


public class WorkSheetService {

    private WorkingSheetMeta t = new WorkingSheetMeta();

    public WorkingSheet save(Map<String, Object> input) {
        WorkingSheet workingSheet = new WorkingSheet();
        BeanUtil.copy(input, workingSheet);
        Transaction tx = Datastore.beginTransaction();
        Datastore.put(workingSheet);
        tx.commit();
        return workingSheet;
    }

//    public List<Tweet> getTweetList() {
//        return Datastore.query(t).sort(t.createdDate.desc).asList();
//    }

}
